************** Voting *************************
use "$Data_generated/Canton.dta", replace
gen post26=1 if year>1926
replace post26=0 if missing(post26)

gen ext_o_right36=ext_dr36/right36

reg ext_dr36  i.year##c.asin_perm i.post26##c.asin_pop, robust cluster(deppct)
margins, dydx(asin_perm) over(year)
marginsplot, xline(1927, lwidth(10) lpattern(solid) lcolor(gs9%30)) text(0.03 1927 "Condemnation", orientation(vertical) size(small)) title("Marginal effects - AF Branches on % Ext Right", size(small)) subtitle("No control", size(vsmall)) xtitle("Year") xlabel(1921(1)1936,alternate) yline(0, lpattern(dash) lcolor(gs3%50))
graph save "Sect1.gph", replace

reg ext_o_right36  i.year##c.asin_perm i.post26##c.asin_pop, robust cluster(deppct)
margins, dydx(asin_perm) over(year)
marginsplot, xline(1927, lwidth(10) lpattern(solid) lcolor(gs9%30)) text(0.03 1927 "Condemnation", orientation(vertical) size(small)) title("Marginal effects - AF Branches on Ext Right/Right", size(small)) subtitle("No control", size(vsmall)) xtitle("Year") xlabel(1921(1)1936,alternate) yline(0, lpattern(dash) lcolor(gs3%50))
graph save "Sect2.gph", replace
graph combine "Sect1.gph" "Sect2.gph", ycommon row(1)
graph export "$Figures/FigureB3.pdf", name(Graph) replace
graph export "$Figures/FigureB3.png", name(Graph) replace